package com.amigo.online.provider.user.service;

import com.amigo.online.common.core.response.Result;
import com.amigo.online.common.param.dto.activity.AddActivityDto;
import com.amigo.online.common.param.result.activity.ActivityInfo;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * @author pangdonghao
 * @version 1.0
 * @csdn https://blog.csdn.net/pangdongh
 * @createDate 2019/11/07 10:51
 */
public interface ActivityService {
    void add(AddActivityDto addActivityDto);

    List<ActivityInfo> getActivityByUserId(@PathVariable("userId") Long userId, @PathVariable("page") Integer page);

    Result<List<ActivityInfo>> getActivity(Integer page);

    List<ActivityInfo> getActivitiesIParticipated(Integer page);

    Result participateActivity(Long id);

    void cancelParticipateActivity(Long id);

    @Transactional(rollbackFor=Exception.class)
    boolean cover(@RequestPart(value = "image") MultipartFile image);

    String getCover();

    Long getRead();

    void putRead(Long readNum);

    int unreadNum();
}
